<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title></title>
		<link rel="stylesheet" href="css/page1.css" />
		<link rel="stylesheet" href="css/pagelogin.css" />
		<style type="text/css">
		
		</style>
	</head>
	<body>
		<div class="loginheader">
			<div class="loginheader-center">
				<div class="sheaderLeft fl">
            	<img src="img/logo.png" width="30" height="70">
           		</div>
           		<div class="sheaderRight fr">
            	<a href="#" >寺库首页</a>
                <a href="#" >收藏寺库</a>
                <a href="#" >寺库APP</a>
            </div>
			</div>
		</div>
		<div class="loginmian">
			<div class="reg-box">
				<div class="login-in fr">
					<h1>欢迎登录</h1>
					<form>
						<div class="login-input1">
							<input id="userName" type="text" placeholder="用户名/手机/邮箱" />
							<i class="picUser"></i>
						</div>
						<div class="login-input2">
							<input id="password" type="password" placeholder="密码" />
							<i class="picPass"></i>
						</div>
						<div class="remember">
							<label class="rememberMe"><input checked="checked" id="remLoginInfo" type="checkbox"> 记住账号</label>
						</div>
						<div id="tip">						
						</div>
						<div class="btn_submit">
               			 <input id="loginButton" class="input_sub" name="" value="立即登录"  type="button">
            			</div>
					</form>
					
					<div class="jiathis">
                <p>使用合作网站账号登录</p>
                <p>
                    <a style="display: inline-block; width: 50px; height: 25px; cursor: pointer;" href="javascript:void(0)" onclick="qqLogin()">
                        <img src="img/qq.jpg" alt="QQ登陆">
                        <span style="margin-left: 5px;">QQ</span>
                    </a>
                    <a style="display: inline-block; width: 60px; height: 25px; cursor: pointer;" href="javascript:void(0)" onclick="weixinLogin()">
                        <img src="img/WeChat.png" alt="微信登录" style="height: 24px;">
                        <span style="margin-left: 5px;">微信</span>
                    </a>
                </p> 
					</div>
                <div class="msg">
                <span class="fl">还不是寺库会员？<a href="register.html" target="_blank" class="active">免费注册</a></span>              
                <span class="fr"><a href="#" target="_blank">忘记密码？</a></span>          
           			 </div>
				</div>
			</div>
		</div>
		<div class="footer">
			<div class="content">
				<ul>

					<li>
						<a href="#">新手指南</a>
						<br />
						<a href="#">付款方式</a>
						<br />
						<a href="#">物流配送</a>
						<br />
						<a href="#">售后服务</a>
					</li>
					<li>
						<a href="#">寺库微博</a>
						<br />
						<a href="#">友情链接</a>
						<br />
						<a href="#">奢侈品热词</a>
						
					</li>
					<li>
						<a href="#">加入寺库</a>
						<br />
						<a href="#">联系我们</a>
						<br />
						<a href="#">关于寺库</a>
						<br />
						<a href="#">帮助中心</a>
					</li>
					<li>
						<a href="#">寺库奢侈品养护</a>
						<br />
						<a href="#">寺库招商</a>
						<br />
						<a href="#">寺库加盟店</a>
					
					</li>
				</ul>
			<div class="footer-info">
				<p>
					<span>统一社会信用代码：91110102689248179K</span>
	                <span><a href="#" target="_blank"><img src="//mpic.secooimg.com/images/2016/06/21/pcfooterbatb.png">京公安备11010102001392</a></span>
	                <span>京ICP证110119号 京ICP备09084709号-3</span>
	                <span>ISO9001中国质量管理体系认证</span>
				</p>
			<p>COPYRIGHT © 2010-2017 北京寺库商贸有限公司 版权所有</p>
			<p class="footer-info-imgs">
				<a href="#"><img src="img/f_01.jpg"/></a>
				<a href="#"><img src="img/f_04.jpg"/></a>
				<a href="#"><img src="img/cnnic.png"/></a>
				<a href="#"><img src="img/kexin.jpg"/></a>
				<a href="#"><img src="img/f_03.jpg"/></a>
			</p>
			</div>
		</div>
		</div>
	</body>
</html>
<script src="js/jquery-1.11.0.min.js" type="text/javascript"></script>
<script src="js/Cookie.js" type="text/javascript" charset="utf-8"></script>
<script src="js/Useker.Ajax.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript">
	var username=document.getElementById("userName")
	var upwd=document.getElementById("password")
	var remLoginInfo=document.getElementById("remLoginInfo")
	var tip=document.getElementById("tip")
	var objStr=getCookieValueByKey("loginKey")
		
		if (objStr){
			var obj=JSON.parse(objStr);
			username.value=obj.uname;
			upwd.value=obj.upwd;
		}
	document.getElementById("loginButton").onclick=function(){
			 if (remLoginInfo.checked) {
	    	var obj={};
	    	obj.uname=username.value;
	    	obj.upwd=upwd.value;
		var date=new Date();
		date.setDate(date.getDate()+30)
		setCookie("loginKey",JSON.stringify(obj),date)
		}
		if(username.value&&upwd.value){	
			tip.innerText=""
		ajax({
			url:"http://127.0.0.1/secoo/secoo/login.php",
			type:"post",
			data:{"username":username.value,"upwd":upwd.value},
			success:function(res){	
				if (res.status==1) {
					tip.innerText=res.msg
					 window.location.href="index.html?uname="+username.value;
				}else{
					tip.innerText=res.msg
				}
		
			}
		})
		}else{
			tip.innerText="请填写用户名和密码！"
		}		
	}
</script>

